<?php
$news_name=$_GET['news_name'];
$news_instr=$_GET['news_instr'];
$dbh=new PDO('mysql:host=localhost;dbname=zcjn','root','root');
$sql="insert into news(news_name,news_instr) VALUES('$news_name','$news_instr')";
//echo $sql;
$arr=$dbh->exec($sql);
if($arr)
{
    header("location:list.php");
}
else{
    echo "添加失败";
}
